﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace CMS
{
    public partial class Sistema : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string user = HttpContext.Current.User.Identity.Name;
            if (user != "")
            {
                lblUsuario.Text = "Usuario conectado: " + user;
            }
        }

        protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
        {
            Context.Request.Cookies["medisys"].Expires = DateTime.Now;
            FormsAuthentication.SignOut();
            Response.Redirect("index.aspx");
        }
    }
}